package com.znk.test;

import com.znk.entity.User;
import com.znk.ioc.MyClassPathApplicationContext_02;
import org.springframework.context.ApplicationContext;

public class MyDemo_02 {
    public static void main(String[] args) {
        ApplicationContext context = new MyClassPathApplicationContext_02("spring.xml");
        User user = (User) context.getBean("user");
        User user2 = (User) context.getBean("user2");
        User user3 = context.getBean(User.class);
        System.out.println(user);
        System.out.println(user2);
        System.out.println(user3);
    }
}
